<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Compiling and Using libinfinity</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.0">
<link rel="home" href="index.html" title="libinfinity-0.4 Reference Manual">
<link rel="up" href="ch01.html" title="About libinfinity">
<link rel="prev" href="ch01.html" title="About libinfinity">
<link rel="next" href="ch02.html" title="Common libinfinity API">
<meta name="generator" content="GTK-Doc V1.15 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
<td><a accesskey="p" href="ch01.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">libinfinity-0.4 Reference Manual</th>
<td><a accesskey="n" href="ch02.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry" title="Compiling and Using libinfinity">
<a name="custom-compiling"></a><div class="titlepage"></div>
<div class="refsect1" title="Compiling libinfinity">
<a name="building"></a><h2>Compiling libinfinity</h2>
<p>
This chapter explains how to compile libinfinity on a UNIX-like operating
system such as Linux. On Windows, you can pretty much follow the same
instructions once you have set up a MinGW/MSYS build environment and
installed the necessary dependencies to the correct locations. This document
does not cover how to do this but might in the future. It is also possible
to build libinfinity using the Microsoft Compiler and Visual Studio IDE but
there are no project files so far.
</p>
<p>
The first thing to do is to check whether all dependencies of libinfinity are
installed. The following list shows what packages are required to be present
on your system prior to building libinfinity:
</p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem"><p>libxml2</p></li>
<li class="listitem"><p>glib-2.0 &gt;= 2.16</p></li>
<li class="listitem"><p>gnutls &gt;= 1.7.2</p></li>
<li class="listitem"><p>gsasl &gt;= 0.2.21</p></li>
<li class="listitem"><p>gtk+ &gt;= 2.12 (optional)</p></li>
<li class="listitem"><p>avahi-client (optional)</p></li>
<li class="listitem"><p>libdaemon (optional)</p></li>
</ul></div>
<p>
Most if not all of them are most likely available in the package manager of
your operating system vendor. It is much more convenient to obtain them from
there than building them on your own.
</p>
<p>
The next step is to obtain the current source code for libinfinity. Point your
web browser to <a class="ulink" href="http://releases.0x539.de/libinfinity" target="_top">
http://releases.0x539.de/libinfinity</a> and grab the latest
<code class="literal">.tar.gz</code> file available, or exactly the version you want if
you are looking for a specific one. Then unpack the tarball. On the command
line this can be done using the following command:
</p>
<pre class="programlisting">
tar xvfz libinfinity-0.4.tar.gz
</pre>
<p>
After unpacking, descend into the newly created directory and run the
<code class="filename">configure</code> script there. This performs several checks to
adapt the build for your specific operating system and environment. The script
can be passed several command-line arguments to alter the build. For example,
the <code class="systemitem">--prefix</code> argument specifies the directory
libinfinity will be installed into after the build. It defaults to
<code class="filename">/usr/local</code> but you might want to install it to a
different place, such as <code class="filename">/opt/libinfinity</code>. In that case
run the following:
</p>
<pre class="programlisting">
./configure --prefix=/opt/libinfinity
</pre>
<p>To get a list of all possible arguments run
<code class="filename">configure</code> with the <code class="systemitem">--help</code>
argument. If you do not want to change the installation path simply omit the
<code class="systemitem">--prefix=/opt/libinfinity</code> in the command above.
</p>
<p>
When all dependencies are installed correctly the
<code class="filename">configure</code> script will run smoothly and end up with a
status summary of what parts of libinfinity will or will not be built. If
there are errors you need to fix them (for examply by installing a missing
dependency) and run <code class="filename">configure</code> again. After it ran it
created a <code class="filename">Makefile</code> and you can build the package via:
</p>
<pre class="programlisting">
make
</pre>
<p>
This might take some time but it is not supposed to produce an error. If it
does something might be wrong with your build setup that
<code class="filename">configure</code> was unable to detect. When make finished
install the package using:
</p>
<pre class="programlisting">
make install
</pre>
<p>
Depending on the installation directory you chose with the
<code class="systemitem">--prefix</code> argument to configure you might need
superuser privileges for this step.
</p>
</div>
<div class="refsect1" title="Compiling applications using libinfinity">
<a name="compiling"></a><h2>Compiling applications using libinfinity</h2>
</div>
<div class="refsect1" title="Environment variables">
<a name="envvars"></a><h2>Environment variables</h2>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.15</div>
</body>
</html>